package com.crm.jdy.common.dto;

import com.baomidou.mybatisplus.annotation.*;
import com.crm.jdy.common.vo.PageVO;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ClientIncomeInfoDto extends PageVO implements Serializable {

    private static final long serialVersionUID = 1616726464829L;

    @TableId(value = "income_id", type = IdType.ID_WORKER_STR)
    @ApiModelProperty(name = "incomeId" , value = "回款主键id")
    private String incomeId;

    @ApiModelProperty(name = "incomeClient" , value = "客户名称")
    private String incomeClient;

    @NotNull(message = "合同编号不为空")
    @ApiModelProperty(name = "incomeContractid" , value = "合同编号")
    private String incomeContractid;

    @ApiModelProperty(name = "incomePeriods" , value = "期数")
    private String incomePeriods;


    @ApiModelProperty(name = "incomeTime" , value = "回款日期")
    private String incomeTime;

    @ApiModelProperty(name = "incomeMoney" , value = "回款金额")
    private String incomeMoney;

    @ApiModelProperty(name = "incomeWay" , value = "回款方式")
    private String incomeWay;

    @ApiModelProperty(name = "incomeStatus" , value = "审核状态")
    private String incomeStatus;

    @ApiModelProperty(name = "incomeContractMoney" , value = "合同金额")
    private String incomeContractMoney;

    @ApiModelProperty(name = "incomeChargePerson" , value = "负责人")
    private String incomeChargePerson;

    @JsonIgnore
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(name = "createTime" , value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    @JsonIgnore
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @ApiModelProperty(name = "updateTime" , value = "更新最新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @ApiModelProperty(name = "incomeCreatePerson" , value = "创建人")
    private String incomeCreatePerson;

    @JsonIgnore
    @TableLogic
    @ApiModelProperty(name = "isDelete" , value = "0正常 1删除")
    private Integer isDelete;

    @ApiModelProperty(name = "incomeRemark" , value = "备注信息")
    private String incomeRemark;


}
